CREATE TABLE DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT
(
    IS_CONTAIN_DIFFICULT NVARCHAR2(100),
    END_AGENT_CODE       NVARCHAR2(100),
    END_AGENT_NAME       NVARCHAR2(100),
    VIRT_CODE            NVARCHAR2(100),
    VIRT_NAME            NVARCHAR2(100),
    NEED_SIGN_COUNT_1D   NUMBER,
    RETENTION_COUNT_1D   NUMBER,
    NEED_SIGN_COUNT_2D   NUMBER,
    RETENTION_COUNT_2D   NUMBER,
    NEED_SIGN_COUNT_3D   NUMBER,
    RETENTION_COUNT_3D   NUMBER,
    RETENTION_COUNT_4D   NUMBER,
    NEED_SIGN_COUNT_4D   NUMBER,
    NEED_SIGN_COUNT_5D   NUMBER,
    RETENTION_COUNT_5D   NUMBER,
    RETENTION_COUNT_6D   NUMBER,
    NEED_SIGN_COUNT_6D   NUMBER,
    NEED_SIGN_COUNT_7D   NUMBER,
    RETENTION_COUNT_7D   NUMBER,
    NEED_SIGN_OVER_7D    NUMBER,
    RETENTION_OVER_7D    NUMBER,
    DATE_TIME            DATE,
    UPDATE_TIME          DATE
)
;

COMMENT ON TABLE DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT IS ' 代理区滞留同步ORACLE';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.IS_CONTAIN_DIFFICULT IS '是否包含问题件1是2否';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.END_AGENT_CODE IS '末端网点所属代理区编码';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.END_AGENT_NAME IS '末端网点所属代理区名称';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.VIRT_CODE IS '虚拟代理区名称';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.VIRT_NAME IS '虚拟代理区名称';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.NEED_SIGN_COUNT_1D IS '1天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.RETENTION_COUNT_1D IS '1天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.NEED_SIGN_COUNT_2D IS '2天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.RETENTION_COUNT_2D IS '2天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.NEED_SIGN_COUNT_3D IS '3天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.RETENTION_COUNT_3D IS '3天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.RETENTION_COUNT_4D IS '4天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.NEED_SIGN_COUNT_4D IS '4天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.NEED_SIGN_COUNT_5D IS '5天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.RETENTION_COUNT_5D IS '5天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.RETENTION_COUNT_6D IS '6天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.NEED_SIGN_COUNT_6D IS '6天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.NEED_SIGN_COUNT_7D IS '7天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.RETENTION_COUNT_7D IS '7天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.NEED_SIGN_OVER_7D IS '超7天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.RETENTION_OVER_7D IS '超7天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT.DATE_TIME IS '分区日期';


CREATE TABLE DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP
(
    IS_CONTAIN_DIFFICULT NVARCHAR2(100),
    END_AGENT_CODE       NVARCHAR2(100),
    END_AGENT_NAME       NVARCHAR2(100),
    VIRT_CODE            NVARCHAR2(100),
    VIRT_NAME            NVARCHAR2(100),
    NEED_SIGN_COUNT_1D   NUMBER,
    RETENTION_COUNT_1D   NUMBER,
    NEED_SIGN_COUNT_2D   NUMBER,
    RETENTION_COUNT_2D   NUMBER,
    NEED_SIGN_COUNT_3D   NUMBER,
    RETENTION_COUNT_3D   NUMBER,
    RETENTION_COUNT_4D   NUMBER,
    NEED_SIGN_COUNT_4D   NUMBER,
    NEED_SIGN_COUNT_5D   NUMBER,
    RETENTION_COUNT_5D   NUMBER,
    RETENTION_COUNT_6D   NUMBER,
    NEED_SIGN_COUNT_6D   NUMBER,
    NEED_SIGN_COUNT_7D   NUMBER,
    RETENTION_COUNT_7D   NUMBER,
    NEED_SIGN_OVER_7D    NUMBER,
    RETENTION_OVER_7D    NUMBER,
    DATE_TIME            DATE,
    UPDATE_TIME          DATE
)
;

COMMENT ON TABLE DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP IS ' 代理区滞留同步ORACLE';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.IS_CONTAIN_DIFFICULT IS '是否包含问题件1是2否';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.END_AGENT_CODE IS '末端网点所属代理区编码';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.END_AGENT_NAME IS '末端网点所属代理区名称';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.VIRT_CODE IS '虚拟代理区名称';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.VIRT_NAME IS '虚拟代理区名称';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.NEED_SIGN_COUNT_1D IS '1天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.RETENTION_COUNT_1D IS '1天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.NEED_SIGN_COUNT_2D IS '2天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.RETENTION_COUNT_2D IS '2天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.NEED_SIGN_COUNT_3D IS '3天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.RETENTION_COUNT_3D IS '3天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.RETENTION_COUNT_4D IS '4天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.NEED_SIGN_COUNT_4D IS '4天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.NEED_SIGN_COUNT_5D IS '5天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.RETENTION_COUNT_5D IS '5天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.RETENTION_COUNT_6D IS '6天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.NEED_SIGN_COUNT_6D IS '6天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.NEED_SIGN_COUNT_7D IS '7天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.RETENTION_COUNT_7D IS '7天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.NEED_SIGN_OVER_7D IS '超7天应签收';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.RETENTION_OVER_7D IS '超7天内滞留';
COMMENT ON COLUMN DM_NETMNG_NETWORK_RETENTION_AGENT_SUMMARY_DT_TMP.DATE_TIME IS '分区日期';
